Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing Extensions and Drivers /
Chapter 6 - Printing Resources / Printing Resources Reference
Resources Used Only in Printer Drivers


The Raster Package ('rpck') Resource

The raster package ('rpck') resource, of type gxRasterPackType, controls how bitmap data is packed into rasters for raster drivers. This resource is optional.

Figure 6-24 shows the structure of a raster package resource.

Figure 6-24 The raster package resource

The raster package resource contains the following elements:

The ID of the raster package resource must be the constant gxRasterPackID.
Listing 6-22 shows an example of a raster package resource for an ImageWriter II printer.

Listing 6-22 An example of a raster package resource

resource gxRasterPackType (gxRasterPackID, sysHeap, purgeable)
{
   2500,             /* ImageWriter packing buffer size */
   4,                /* 4 color passes */
   16,               /* print head is 16 pixels high */
   2,                /* requires 2 passes to achieve 16 pixels */
   1,                /* 1 pixel difference between passes */
   gxInterlaceColor  /* use interlace to avoid contamination */
};
This resource specifies that the ImageWriter II printer uses a packing buffer that is 2500 bytes long, which is long enough for the largest line packaged by the driver. Since the driver uses CMYK color, 4 passes are required to print an image. The print head is 16 pixels high, and it requires 2 printing passes to print 16 pixels of data.

If you use the default implementation of the GXRasterDataIn message, you must define a raster package ('rpck') resource. The GXRasterDataIn message is described on page 4-97 in the chapter "Printing Messages" in this book.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help